{% extends 'base.html' %}
{%  block title %}学生注册{% endblock %}
{% block body %}
 <form class="form-signin text-center" action="/add_student/" method="post">
        <h2 class="form-signin-heading">学生注册</h2>
           <input type="text" name="id_student" class="form-control" placeholder="学号" required>
           <input type="text" name="name_student" class="form-control" placeholder="姓名" required>
     性别:
           <input type="radio" name="sex_student" class="radio disabled" value="男" required>男
           <input type="radio" name="sex_student" class="radio disabled" value="女" required>女<hr>
     院系:
            <input type="radio" name="dept_student" class="radio disabled" value="电气与信息工程系" required>电气与信息工程系
            <input type="radio" name="dept_student" class="radio disabled" value="经济管理系" required>经济管理系
            <input type="radio" name="dept_student" class="radio disabled" value="土木工程系" required>土木工程系
            <input type="radio" name="dept_student" class="radio disabled" value="东校区" required>东校区

        <input type="text" name="major_student" class="form-control" placeholder="专业名称" required>
           <input type="email" name="email_student" class="form-control" placeholder="邮箱" required autofocus>
           <input type="password" name="password_student" class="form-control" placeholder="密码" required>
            <input type="password" name="passwords_student" class="form-control" placeholder="再次输入密码" required>
           <button id="seb_btn" onclick="add()" class="btn btn-lg btn-primary  btn-block"  type="submit" data-loading-text="Loading...">注册</button>
             <div  id="loa" class="spinner-border text-primary" role="status" style="display: none">
              <span class="sr-only">Loading...</span>
            </div>
      </form>
    <script>
    function add(){
        document.getElementById("seb_btn").style.display="none";
        document.getElementById("loa").style.display="";
        setTimeout(load, 14000);
    }
    function load(){
        document.getElementById("seb_btn").style.display="";
        document.getElementById("loa").style.display="none";
        }
    </script>
{% endblock %}
